To utilize the System.Drawing.Graphics capabilities to draw on an image:
- Call ImageX. GetGraphics method to get a System.Drawing.Graphics object and associate it with the ImageX image.
- The returned graphics object can be drawn upon using the standard System.Drawing.Graphics drawing methods.
- When drawing is complete and the graphics object is no longer needed, do one of the following:
- Call ImageX. ReleaseGraphics method, to update the ImageX object with the image in the Graphics object, then release the memory associated with the graphics object.
- Call ImageX.ReleaseGraphics(True) to update the ImageX object with the image in the graphics object, then release the memory associated with the graphics object.
- Call ImageX.ReleaseGraphics(False), to release the memory associated with the graphics object without updating the ImageX object.
See Also